/******************************************************************************
  Some simple Hisilicon Hi3516EV200 system functions.

  Copyright (C), 2017-2018, Hisilicon Tech. Co., Ltd.
 ******************************************************************************
    Modification:  2018-1 Created
******************************************************************************/
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* End of #ifdef __cplusplus */

#include <stdio.h>
#include "hi_type.h"
#include "osal_mmz.h"

static HI_VOID SYSCONFIG_exit(void)
{
    extern void hi_sysconfig_exit(void);
    hi_sysconfig_exit();
}

static HI_VOID BASE_exit(void)
{
    extern void base_mod_exit(void);
    base_mod_exit();
}

static HI_VOID MMZ_exit(void)
{
    extern void media_mem_exit(void);
    media_mem_exit();
}
static HI_VOID SYS_exit(void)
{
    extern void sys_mod_exit(void);
    sys_mod_exit();
}

static HI_VOID ISP_exit(void)
{
    extern void isp_mod_exit(void);
    isp_mod_exit();
}

static HI_VOID VI_exit(void)
{
    extern void vi_mod_exit(void);
    vi_mod_exit();
}

static HI_VOID RGN_exit(void)
{
    extern void rgn_mod_exit(void);
    rgn_mod_exit();
}

static HI_VOID VGS_exit(void)
{
    extern void vgs_mod_exit(void);
    vgs_mod_exit();
}

static HI_VOID VPSS_exit(void)
{
    extern void vpss_mod_exit(void);
    vpss_mod_exit();
}

static HI_VOID VO_exit(void)
{
    extern void vou_mod_exit(void);
    vou_mod_exit();
}

static HI_VOID TDE_exit(void)
{
    extern void tde_mod_exit(void);
    tde_mod_exit();
}

static HI_VOID HIFB_exit(void)
{
    extern HI_VOID hifb_cleanup(HI_VOID);
    hifb_cleanup();
}

static HI_VOID MIPIRX_exit(void)
{
    extern void mipi_rx_mod_exit(void);
    mipi_rx_mod_exit();
}

static HI_VOID RC_exit(void)
{
    extern void rc_mod_exit(void);
    rc_mod_exit();
}

static HI_VOID VENC_exit(void)
{
    extern void venc_mod_exit(void);
    venc_mod_exit();
}

static HI_VOID CHNL_exit(void)
{
    extern void chnl_mod_exit(void);
    chnl_mod_exit();
}

static HI_VOID VEDU_exit(void)
{
    extern void vedu_mod_exit(void);
    vedu_mod_exit();
}

static HI_VOID H264e_exit(void)
{
    extern void h264e_mod_exit(void);
    h264e_mod_exit();
}

static HI_VOID H265e_exit(void)
{
    extern  void h265e_mod_exit(void);
    h265e_mod_exit();
}

static HI_VOID JPEGE_exit(void)
{
    extern void jpege_mod_exit(void);
    jpege_mod_exit();
}

static HI_VOID PWM_exit(void)
{
    extern void pwm_exit(void);
    pwm_exit();
}

static HI_VOID PIRIS_exit(void)
{
    extern void piris_exit(void);
    piris_exit();
}

static HI_VOID hi_sensor_spi_exit(void)
{
    extern void sensor_spi_dev_exit(void);
    sensor_spi_dev_exit();
}

static HI_VOID hi_sensor_i2c_exit(void)
{
    extern void hi_dev_exit(void);
    hi_dev_exit();
}

static void IVE_exit(void)
{
  extern void ive_mod_exit(void);
  ive_mod_exit();
}

static void Cipher_exit(void)
{
    extern void cipher_drv_mod_exit(void);
    cipher_drv_mod_exit();
}

static void AiaoMod_exit(void)
{
    extern void aiao_mod_exit(void);
    aiao_mod_exit();
}

static void AiMod_exit(void)
{
    extern void ai_mod_exit(void);
    ai_mod_exit();
}

static void AoMod_exit(void)
{
    extern void ao_mod_exit(void);
    ao_mod_exit();
}

static void AencMod_exit(void)
{
    extern void aenc_mod_exit(void);
    aenc_mod_exit();
}

static void AdecMod_exit(void)
{
    extern void adec_mod_exit(void);
    adec_mod_exit();
}

static void AcodecMod_exit(void)
{
    extern void acodec_mod_exit(void);
    acodec_mod_exit();
}

static void remove_audio(void)
{
    AcodecMod_exit();
    AdecMod_exit();
    AencMod_exit();
    AoMod_exit();
    AiMod_exit();
    AiaoMod_exit();
}

extern void osal_proc_exit(void);

static HI_VOID sil9024_exit(void)
{
    extern void sil902x_exit(void);
    sil902x_exit();
}

static HI_VOID adv7179_bt656_exit(void)
{
    extern void adv7179_exit(void);
    adv7179_exit();
}

static HI_VOID ota5182_exit(void)
{
    extern void hi_ssp_lcd_ota5182_exit(void);
    hi_ssp_lcd_ota5182_exit();
}

static HI_VOID st7789_exit(void)
{
    extern void hi_ssp_lcd_st7789_exit(void);
    hi_ssp_lcd_st7789_exit();
}

static HI_VOID st7796_exit(void)
{
    extern void  hi_ssp_lcd_st7796_exit(void);
    hi_ssp_lcd_st7796_exit();
}

HI_VOID SDK_exit(void)
{
#if 0
    sil9024_exit();
    adv7179_bt656_exit();
    ota5182_exit();
    st7789_exit();
    st7796_exit();
#endif
    remove_audio();
    Cipher_exit();
    MIPIRX_exit();
    IVE_exit();
    RC_exit();
    JPEGE_exit();
    H264e_exit();
    H265e_exit();
    VENC_exit();
    VEDU_exit();
    CHNL_exit();

    TDE_exit();
    HIFB_exit();
    VO_exit();
    VPSS_exit();
    ISP_exit();
    VI_exit();
    VGS_exit();
    RGN_exit();
    hi_sensor_i2c_exit();
    hi_sensor_spi_exit();
    PWM_exit();
    PIRIS_exit();

    SYS_exit();
    BASE_exit();
    MMZ_exit();
    osal_proc_exit();
    SYSCONFIG_exit();

    printf("SDK exit ok...\n");
}


#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* End of #ifdef __cplusplus */


